<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">
    <title>寻医问药</title>
    <!-- Bootstrap core CSS -->
    <link href="{{asset('/layui.css')}}" rel="stylesheet" media="all">
    <link rel="stylesheet" href="{{asset('/bootstrap.min.css')}}">
    <link rel="stylesheet" href="{{asset('/dashboard.css')}}">
    <link rel="stylesheet" href="{{asset('/bootstrap-theme.min.css')}}">
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="{{asset('/jquery.js')}}"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="{{asset('/bootstrap.min.js')}}"></script>
</head>
<body>
@extends('index.base')
@if(session('__Ajax_RedirectFunc_status') == true)
    <div>
        <div class="alert alert-success alert-dismissible fade in" role="alert">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
            <h3>成功</h3>
            <p><?php echo session('__Ajax_RedirectFunc_message');?></p>
            <p><?php echo session('__Ajax_RedirectFunc_plugin');?></p>
        </div>
    </div>
@endif
@if(session('__Ajax_RedirectFunc_status') === false)
    <div >
        <div class="alert alert-danger alert-dismissible fade in" role="alert">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
            <h3>失败</h3>
            <p><?php echo session('__Ajax_RedirectFunc_message');?></p>
            <p><?php echo session('__Ajax_RedirectFunc_plugin');?></p>
        </div>
    </div>
@endif
<div class="container-fluid">
    <div class="container">
        <div class="row">
            <div class="col-md-12 ">
                <h2>我的订单</h2>
                <hr>
                <div class="panel-body" >
                    <table class="table table-responsive table-condensed table-hover table-striped">
                        <thead>
                        <tr>
                            <th>药品名称</th>
                            <th>药品介绍</th>
                            <th>治疗症状</th>
                            <th>下单时间</th>
                            <th>状态</th>
                        </tr>
                        </thead>
                        <tbody>
                        @foreach($orderData as $data)
                            <tr>
                                <td>{{$data->drug_name}}</td>
                                <td>{{$data->drug_info}}</td>
                                <td>{{$data->drug_symptom}}</td>
                                <td>{{$data->re_user_drug_time}}</td>
                                <td>{{$data->status_name}}</td>
                                <div class="modal fade" id="orderDrug{{$data->drug_id}}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                                    <div class="modal-dialog">
                                        <div class="modal-content">
                                            <div class="modal-header">
                                                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                                                <h4 class="modal-title" id="myModalLabel">预定药品</h4>
                                            </div>
                                            <div class="modal-body">
                                                <form action="/orderGoods" method="post">
                                                    <input type="hidden" name="_token" value="{{ csrf_token() }}">
                                                    <input type="hidden"  name="drug_id" value="{{$data->drug_id}}" >
                                                    确定要预定吗？
                                            </div>
                                            <div class="modal-footer">
                                                <button type="submit" class="btn btn-info">确定</button>
                                                <button type="button" class="btn btn-default" data-dismiss="modal">返回</button>
                                                </form>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </tr>
                        @endforeach
                        </tbody>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>